<template>
  <div class="body">
    <div class="header">
      <h1>欢迎来到zlgb的世界</h1>
    </div>
    <div class="main-content">
      <p class="time">{{ currentTime }}</p>
    </div>
    <div class="footer">
      <p>这里充满了无限的可能与惊喜，希望你能享受其中的每一刻！</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentTime: new Date().toLocaleTimeString()
    };
  },
  mounted() {
    this.updateTime();
  },
  methods: {
    updateTime() {
      setInterval(() => {
        this.currentTime = new Date().toLocaleTimeString();
      }, 1000);
    }
  }
};
</script>

<style scoped>
/* 整体页面背景颜色 */
.body {
  background-color: #f0f0f5;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 98vh;
  margin: 0;
  position: relative;
  overflow: hidden;
}

/* 标题区域样式 */
.header {
  position: absolute;
  left: 20px;
}

/* 主要内容区域样式 */
.main-content {
  text-align: center;
  background-color: white;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  width: 100%;
}

/* 标题样式 */
h1 {
  color: #336699;
  margin-bottom: 20px;
  font-size: 24px;
}

/* 欢迎语样式 */
.footer {
  background-color: #ffffff;
  width: 100%;
  text-align: center;
  padding: 10px 0;
}

.footer p {
  color: #666;
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}

/* 时间显示样式 */
.time {
  color: #336699;
  font-size: 52px;
  font-weight: bold;
  margin-bottom: 20px;
  background-color: #e0f7fa;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
</style>